﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.CommonTables.SC.DCYY
{
    /// <summary>
    /// QingDanJiLuCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class YaChuangJianKongBiaoCtrl : CustomCommonTableCtrl
    {
        public YaChuangJianKongBiaoCtrl()
        {
            InitializeComponent();
            IniteRadioBation();
        }

        private void sj_GotFocus(object sender, RoutedEventArgs e)
        {
            CustomTextCtrl cuText = sender as CustomTextCtrl;
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;

            cusDatePicker.ShowDialog();

            if (cusDatePicker.Result)
            {
                cuText.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMD_CN);//2005年11月5日
            }
        }
        private void IniteRadioBation()
        {

            new RadioButtonHelper().ChangeRadioSatus(jiaz1, jianq1, bub1);
            new RadioButtonHelper().ChangeRadioSatus(jiaz2, jianq2, bub2);
            new RadioButtonHelper().ChangeRadioSatus(jiaz3, jianq3, bub3);
            new RadioButtonHelper().ChangeRadioSatus(jiaz4, jianq4, bub4);
           
        }

        private void sjs_GotFocus(object sender, RoutedEventArgs e)
        {
            CustomTextCtrl cuText = sender as CustomTextCtrl;
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;

            cusDatePicker.ShowDialog();

            if (cusDatePicker.Result)
            {
                cuText.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM);//2005年11月5日
            }
        }
    }
}
